package zut.cs.liziflower.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.*;

import zut.cs.liziflower.entity.Flower;
import zut.cs.liziflower.entity.FlowerCategory;
import zut.cs.liziflower.entity.Result;
import zut.cs.liziflower.mapper.FlowerCategoryMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xuwenke
 * @since 2022-05-16
 */
@RestController
@RequestMapping("/api/flower-category")
public class FlowerCategoryController {
    @Resource
    FlowerCategoryMapper flowerCateMapper;

    @GetMapping("/category")
    public Result<?> getCategory(){
        //返回鲜花分类
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.ne("status",0);
        return Result.success(flowerCateMapper.selectList(wrapper));
    }



}
